import request from '@/utils/request'

// 查询销售合同列表
export function listSaleContract(query) {
  return request({
    url: '/scm/saleContract/list',
    method: 'get',
    params: query
  })
}

// 查询销售合同详细
export function getSaleContract(id) {
  return request({
    url: '/scm/saleContract/' + id,
    method: 'get'
  })
}

// 新增销售合同
export function addSaleContract(data) {
  return request({
    url: '/scm/saleContract',
    method: 'post',
    data: data
  })
}

// 修改销售合同
export function updateSaleContract(data) {
  return request({
    url: '/scm/saleContract',
    method: 'put',
    data: data
  })
}

// 删除销售合同
export function delSaleContract(id) {
  return request({
    url: '/scm/saleContract/' + id,
    method: 'delete'
  })
}

// 导出销售合同
export function exportSaleContract(query) {
  return request({
    url: '/scm/saleContract/export',
    method: 'get',
    params: query
  })
}